/*
 ============================================================================
 Page	     : 515-516
 Name        : align.c
 Date	     : 20210408
 Author      : Hbue 18060333
 Copyright   : Your copyright notice
 Description : 使用_Alignof和_Alignas(C11)
 ============================================================================
 */

#include <stdio.h>
int main(void)
{
	char ca = 0;
	char cb = 0;
	char cx = 0;
	double dx = 0;
	double dz = 0;
	char _Alignas(double) cz;

	printf("char alignment:   %zd\n", _Alignof(char));
	printf("double alignment:  %zd\n", _Alignof(double));
	printf("&dx: %p\n", &dx);
	printf("&ca: %p\n", &ca);
	printf("&cx: %p\n", &cx);
	printf("&dz: %p\n", &dz);
	printf("&cb: %p\n", &cb);
	printf("&cz: %p\n", &cz);

	return 0;
}

